﻿using Echo.Context.UltiProNet.Contexts;
using Echo.Core.TestAbstraction.WebUITest.MbUnit;
using Echo.Models.UltiProNet;
using Echo.Models.UltimateSoftware.WebUITest.MbUnit;
using MbUnit.Framework;

////*************************************************************************************************************************************
////Created by:     Charles Turiño
////Date created:   4/24/2012
////Modified by: 
////Date modified: 
////Reason: 
////ULTI-75062  Echo Conversion - Business Rules - Locations
////*************************************************************************************************************************************

namespace Echo.Automation.Compliance.BusinessRules.Taxes
{
    [TestFixture]
    [Header("Config")]
    [Config(".NET")]
    [Author("Charles Turiño", "charles_turino@ultimatesoftware.com")]
    [Category("Taxes")]
    [Category("Contribution Rate")]
    [Category("Business Rules")]
    public class TaxContributionRate : MbUnitAutomatedTest
    {
        UltiPro UltiPro;
        UltiProDatabaseContext Database;

        [FixtureSetUp]
        public void FixtureSetUp()
        {
            UltiPro = Launch<UltiPro>();
            Database = Init<UltiProDatabaseContext>();
            Database.Company = ConfigDatabase("ULTIPRO_CALENDAR");
            UltiPro.Pages.Login.LoginAs("merrillg", "password", Config.LanguageCode);
            UltiPro.Pages.CompanySelector.ChooseCompanies("CALEN", "C0014");
        }

        [FixtureTearDown]
        public void FixtureTearDown()
        {
           UltiPro.Browser.Quit();
        }

        [SetUp]
        public void SetUp()
        {
        }

        [TearDown]
        public void TearDown()
        {
        }

        [Test]
        public void Test1()
        {
            UltiPro.Menu.SystemConfiguration.Click(link => link.BusinessRules);
            UltiPro.Pages.BusinessRulesSummary.BusinessRulesSummaryGrid.Find(search => search.BusinessRulesNameFilter, FilterType.Is, "Tax");
        }
    }
}
